Add configuration to create and use global block on a namespace#1727
Add configuration to create and use global block on a namespace#1727
Conversation
4fc9322 to
decffff
Compare
e1eb578 to
edd2604
Compare
edd2604 to
f3d4d96
Compare
baae52b to
4ec6a59
Compare
tjerman
left a comment
There was a problem hiding this comment.
In addition to this; what happens if we change the block definition (the name/id for example), delete it, etc? How do we assure references are ok and we don't just end up with broken pages?
125e8c4 to
6198193
Compare
tjerman
left a comment
There was a problem hiding this comment.
A consideration, else looks good to me 👍 ; wp
| GlobalBlock struct { | ||
| BlockID uint64 `json:"blockID,string,omitempty"` | ||
|
|
||
| Options map[string]interface{} `json:"options,omitempty"` | ||
| Style PageBlockStyle `json:"style,omitempty"` | ||
| Kind string `json:"kind"` | ||
| XYWH [4]int `json:"xywh"` // x,y,w,h | ||
| Meta map[string]any `json:"meta,omitempty"` | ||
|
|
||
| // Warning: value of this field is now handled via resource-translation facility | ||
| // struct field is kept for the convenience for now since it allows us | ||
| // easy encoding/decoding of the outgoing/incoming values | ||
| Title string `json:"title,omitempty"` | ||
|
|
||
| // Warning: value of this field is now handled via resource-translation facility | ||
| // struct field is kept for the convenience for now since it allows us | ||
| // easy encoding/decoding of the outgoing/incoming values | ||
| Description string `json:"description,omitempty"` | ||
| } |
There was a problem hiding this comment.
Seems fine but you could consider just doing this:
GlobalBlock struct {
PageBlock
}Since you're basically doing a full blown copy of the page block this would be fine.
For page layouts, I preserve just the reference and coordinates and size since that's all that we care about there.
64d5780 to
7bc30f3
Compare
d5eef63 to
a48155e
Compare
16027e5 to
63a0a66
Compare
b17424e to
7b09018
Compare
5b052f0 to
dd50534
Compare
94f78e4 to
628d0da
Compare
|
41079ac to
a42eefd
Compare





The following changes are implemented
TODO: Summary
Changes in the user interface:
TODO: Add screenshots, recordings or remove this section
Checklist when submitting a final (!draft) PR